#include "tcpClient.hpp"
#include <memory>
using namespace client;

static void Usage(char* proc)
{
    cout<<"/n/t"<<proc<<" local port error"<<endl;
}

int main(int argc,char* argv[])
{
    if(argc!=3)
    {
        Usage(argv[0]);
        exit(USAGE_ERROR);
    }
    //对输入的参数进行转化
    uint16_t port = atoi(argv[2]);
    //创建指针
    unique_ptr<tcpclient> tclt(new tcpclient(argv[1],port));

    //开始初始化
    tclt->initClient();
    tclt->run();



    return 0;
}